3.17 \(\int x (a+b \tan ^{-1}(c x))^2 \, dx\)

Optimal. Leaf size=76 \[ \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{a b x}{c}+\frac{b^2 \log \left (c^2 x^2+1\right )}{2 c^2}-\frac{b^2 x \tan ^{-1}(c x)}{c} \]

[Out]

-((a*b*x)/c) - (b^2*x*ArcTan[c*x])/c + (a + b*ArcTan[c*x])^2/(2*c^2) + (x^2*(a + b*ArcTan[c*x])^2)/2 + (b^2*Lo
g[1 + c^2*x^2])/(2*c^2)

________________________________________________________________________________________

Rubi [A]  time = 0.106231, antiderivative size = 76, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.417, Rules used = {4852, 4916, 4846, 260, 4884} \[ \frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{a b x}{c}+\frac{b^2 \log \left (c^2 x^2+1\right )}{2 c^2}-\frac{b^2 x \tan ^{-1}(c x)}{c} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*ArcTan[c*x])^2,x]

[Out]

-((a*b*x)/c) - (b^2*x*ArcTan[c*x])/c + (a + b*ArcTan[c*x])^2/(2*c^2) + (x^2*(a + b*ArcTan[c*x])^2)/2 + (b^2*Lo
g[1 + c^2*x^2])/(2*c^2)

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 4916

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Dist[f^2/
e, Int[(f*x)^(m - 2)*(a + b*ArcTan[c*x])^p, x], x] - Dist[(d*f^2)/e, Int[((f*x)^(m - 2)*(a + b*ArcTan[c*x])^p)
/(d + e*x^2), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && GtQ[p, 0] && GtQ[m, 1]

Rule 4846

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTan[c*x])^p, x] - Dist[b*c*p, Int[
(x*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^2*x^2), x], x] /; FreeQ[{a, b, c}, x] && IGtQ[p, 0]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 4884

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rubi steps

\begin{align*} \int x \left (a+b \tan ^{-1}(c x)\right )^2 \, dx &=\frac{1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-(b c) \int \frac{x^2 \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx\\ &=\frac{1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{b \int \left (a+b \tan ^{-1}(c x)\right ) \, dx}{c}+\frac{b \int \frac{a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{c}\\ &=-\frac{a b x}{c}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2-\frac{b^2 \int \tan ^{-1}(c x) \, dx}{c}\\ &=-\frac{a b x}{c}-\frac{b^2 x \tan ^{-1}(c x)}{c}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2+b^2 \int \frac{x}{1+c^2 x^2} \, dx\\ &=-\frac{a b x}{c}-\frac{b^2 x \tan ^{-1}(c x)}{c}+\frac{\left (a+b \tan ^{-1}(c x)\right )^2}{2 c^2}+\frac{1}{2} x^2 \left (a+b \tan ^{-1}(c x)\right )^2+\frac{b^2 \log \left (1+c^2 x^2\right )}{2 c^2}\\ \end{align*}

Mathematica [A]  time = 0.0647758, size = 75, normalized size = 0.99 \[ \frac{2 b \tan ^{-1}(c x) \left (a c^2 x^2+a-b c x\right )+a c x (a c x-2 b)+b^2 \log \left (c^2 x^2+1\right )+b^2 \left (c^2 x^2+1\right ) \tan ^{-1}(c x)^2}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*ArcTan[c*x])^2,x]

[Out]

(a*c*x*(-2*b + a*c*x) + 2*b*(a - b*c*x + a*c^2*x^2)*ArcTan[c*x] + b^2*(1 + c^2*x^2)*ArcTan[c*x]^2 + b^2*Log[1
+ c^2*x^2])/(2*c^2)

________________________________________________________________________________________

Maple [A]  time = 0.012, size = 97, normalized size = 1.3 \begin{align*}{\frac{{a}^{2}{x}^{2}}{2}}+{\frac{{x}^{2}{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}}{2}}+{\frac{{b}^{2} \left ( \arctan \left ( cx \right ) \right ) ^{2}}{2\,{c}^{2}}}-{\frac{{b}^{2}x\arctan \left ( cx \right ) }{c}}+{\frac{{b}^{2}\ln \left ({c}^{2}{x}^{2}+1 \right ) }{2\,{c}^{2}}}+b{x}^{2}a\arctan \left ( cx \right ) +{\frac{ab\arctan \left ( cx \right ) }{{c}^{2}}}-{\frac{xab}{c}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctan(c*x))^2,x)

[Out]

1/2*a^2*x^2+1/2*x^2*b^2*arctan(c*x)^2+1/2/c^2*b^2*arctan(c*x)^2-b^2*x*arctan(c*x)/c+1/2*b^2*ln(c^2*x^2+1)/c^2+
b*x^2*a*arctan(c*x)+1/c^2*a*b*arctan(c*x)-a*b*x/c

________________________________________________________________________________________

Maxima [A]  time = 1.53105, size = 140, normalized size = 1.84 \begin{align*} \frac{1}{2} \, b^{2} x^{2} \arctan \left (c x\right )^{2} + \frac{1}{2} \, a^{2} x^{2} +{\left (x^{2} \arctan \left (c x\right ) - c{\left (\frac{x}{c^{2}} - \frac{\arctan \left (c x\right )}{c^{3}}\right )}\right )} a b - \frac{1}{2} \,{\left (2 \, c{\left (\frac{x}{c^{2}} - \frac{\arctan \left (c x\right )}{c^{3}}\right )} \arctan \left (c x\right ) + \frac{\arctan \left (c x\right )^{2} - \log \left (c^{2} x^{2} + 1\right )}{c^{2}}\right )} b^{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2,x, algorithm="maxima")

[Out]

1/2*b^2*x^2*arctan(c*x)^2 + 1/2*a^2*x^2 + (x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*a*b - 1/2*(2*c*(x/c^
2 - arctan(c*x)/c^3)*arctan(c*x) + (arctan(c*x)^2 - log(c^2*x^2 + 1))/c^2)*b^2

________________________________________________________________________________________

Fricas [A]  time = 2.44117, size = 189, normalized size = 2.49 \begin{align*} \frac{a^{2} c^{2} x^{2} - 2 \, a b c x +{\left (b^{2} c^{2} x^{2} + b^{2}\right )} \arctan \left (c x\right )^{2} + b^{2} \log \left (c^{2} x^{2} + 1\right ) + 2 \,{\left (a b c^{2} x^{2} - b^{2} c x + a b\right )} \arctan \left (c x\right )}{2 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2,x, algorithm="fricas")

[Out]

1/2*(a^2*c^2*x^2 - 2*a*b*c*x + (b^2*c^2*x^2 + b^2)*arctan(c*x)^2 + b^2*log(c^2*x^2 + 1) + 2*(a*b*c^2*x^2 - b^2
*c*x + a*b)*arctan(c*x))/c^2

________________________________________________________________________________________

Sympy [A]  time = 0.934614, size = 107, normalized size = 1.41 \begin{align*} \begin{cases} \frac{a^{2} x^{2}}{2} + a b x^{2} \operatorname{atan}{\left (c x \right )} - \frac{a b x}{c} + \frac{a b \operatorname{atan}{\left (c x \right )}}{c^{2}} + \frac{b^{2} x^{2} \operatorname{atan}^{2}{\left (c x \right )}}{2} - \frac{b^{2} x \operatorname{atan}{\left (c x \right )}}{c} + \frac{b^{2} \log{\left (x^{2} + \frac{1}{c^{2}} \right )}}{2 c^{2}} + \frac{b^{2} \operatorname{atan}^{2}{\left (c x \right )}}{2 c^{2}} & \text{for}\: c \neq 0 \\\frac{a^{2} x^{2}}{2} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atan(c*x))**2,x)

[Out]

Piecewise((a**2*x**2/2 + a*b*x**2*atan(c*x) - a*b*x/c + a*b*atan(c*x)/c**2 + b**2*x**2*atan(c*x)**2/2 - b**2*x
*atan(c*x)/c + b**2*log(x**2 + c**(-2))/(2*c**2) + b**2*atan(c*x)**2/(2*c**2), Ne(c, 0)), (a**2*x**2/2, True))

________________________________________________________________________________________

Giac [A]  time = 1.19749, size = 140, normalized size = 1.84 \begin{align*} \frac{b^{2} c^{2} x^{2} \arctan \left (c x\right )^{2} + 2 \, a b c^{2} x^{2} \arctan \left (c x\right ) + a^{2} c^{2} x^{2} - 2 \, b^{2} c x \arctan \left (c x\right ) - 2 \, \pi a b \mathrm{sgn}\left (c\right ) \mathrm{sgn}\left (x\right ) - 2 \, a b c x + b^{2} \arctan \left (c x\right )^{2} + 2 \, a b \arctan \left (c x\right ) + b^{2} \log \left (c^{2} x^{2} + 1\right )}{2 \, c^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2,x, algorithm="giac")

[Out]

1/2*(b^2*c^2*x^2*arctan(c*x)^2 + 2*a*b*c^2*x^2*arctan(c*x) + a^2*c^2*x^2 - 2*b^2*c*x*arctan(c*x) - 2*pi*a*b*sg
n(c)*sgn(x) - 2*a*b*c*x + b^2*arctan(c*x)^2 + 2*a*b*arctan(c*x) + b^2*log(c^2*x^2 + 1))/c^2